package com.ksd.common.core.crypto;

import java.security.MessageDigest;

public class SHA1 {
    public static byte[] getSha1(byte[] orignalData) {
        if(orignalData == null) {
            return null;
        }
        try {
            MessageDigest md = MessageDigest.getInstance("SHA-1");
            //进行加密处理
            return md.digest(orignalData);
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }
}